package com.saishi.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Question {
    int questionid;
    String questionname;
    int questionscore;
    int questiontype;
    String questionoptions;
    String questionanswer;
    Timestamp updatetime;

    public Question(String question_name, int question_score, int question_type, String question_answer) {
        this.questionname = question_name;
        this.questionscore = question_score;
        this.questiontype = question_type;
        this.questionanswer = question_answer;
    }

    public Question(String question_name, int question_score, int question_type, String question_options, String question_answer) {
        this.questionname = question_name;
        this.questionscore = question_score;
        this.questiontype = question_type;
        this.questionoptions = question_options;
        this.questionanswer = question_answer;
    }

    public Question(String question_name, int question_score, int question_type, String question_options, String question_answer, Timestamp update_time) {
        this.questionname = question_name;
        this.questionscore = question_score;
        this.questiontype = question_type;
        this.questionoptions = question_options;
        this.questionanswer = question_answer;
        this.updatetime = update_time;
    }

    @Override
    public String toString() {
        return "\nquestion{" +
                "questionid=" + questionid +
                ", question_name='" + questionname + '\'' +
                ", question_score=" + questionscore +
                ", question_type=" + questiontype +
                ", question_options='" + questionoptions + '\'' +
                ", question_answer='" + questionanswer + '\'' +
                ", update_time=" + updatetime +
                '}';
    }
}
